using System;
using FreeSql.DataAnnotations;

namespace Colorful.Furniture.PermissionManagement
{

	/// <summary>
	/// 角色授权
	/// </summary>
	[Table(Name = "sys_role_access")]
	public partial class SysRoleAccess {

		/// <summary>
		/// 编码
		/// </summary>
		[Column(Name = "id", IsPrimary = true)]
		public Guid Id { get; set; }

		/// <summary>
		/// 权限编码
		/// </summary>
		[Column(Name = "permission_id")]
		public Guid? PermissionId { get => _PermissionId; set {
			if (_PermissionId == value) return;
			_PermissionId = value;
			Permission = null;
		} }
		private Guid? _PermissionId;

		/// <summary>
		/// 角色编码
		/// </summary>
		[Column(Name = "role_id")]
		public Guid? RoleId { get => _RoleId; set {
			if (_RoleId == value) return;
			_RoleId = value;
			Role = null;
		} }
		private Guid? _RoleId;


		#region 外键 => 导航属性，ManyToOne/OneToOne

		
		public virtual SysRole Role { get; set; }

		
		public virtual SysPermission Permission { get; set; }

		#endregion

		#region 外键 => 导航属性，ManyToMany

		#endregion
	}

}
